<template>
  <div>
    <vue-qr :callback="qrBack" :text="text" :size="250" :logoSrc="logoSrc"></vue-qr>
  </div>
</template>
 
<script setup lang='ts'>
import vueQr from 'vue-qr/src/packages/vue-qr.vue';
import { ref } from 'vue';
const qrData = ref("");
const qrObj = defineProps({
  text: {
    type: String,
    default: ''
  },
  logoSrc: {
    type: String,
    default: ''
  }
})
//qr的回调，每次变动后把二维码的数据保存下来，供下载用
const qrBack = (dataUrl: any) => {
  qrData.value = dataUrl;
}
</script>

<style scoped></style>
